/**
 * 消息控制器
 */
class MessageControl {
	private static dispatcher:egret.EventDispatcher=new egret.EventDispatcher();
	/**
	 * 广播消息
	 * 参数是一个object对象
	 * name消息名称
	 * data数据
	 */
	public static send(event:egret.Event):void{
		MessageControl.dispatcher.dispatchEvent(event);
	}
	/**
	 * 接收广播消息
	 * 
	 */
	public static receive(name:string,callback:Function,thisobject:any):void{
		MessageControl.dispatcher.addEventListener(name,callback,thisobject);
	}
	/**
	 * 删除消息监听
	 */
	public static removeEvent(name:string,callback:Function,thisobject:any):void{
		MessageControl.dispatcher.removeEventListener(name,callback,thisobject);
	}
	public constructor() {

	}
}